<!doctype html>
<html>

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>教师界面</title>
<meta name="description" content="这是教师主页">
<meta name="keywords" content="index">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="http://localhost:8080/graduation/img/lysf.ico">
<link rel="stylesheet" href="http://localhost:8080/graduation/amazeui/css/amazeui.min.css" />
<link rel="stylesheet" href="http://localhost:8080/graduation/teacher/css/admin.css">
<link rel="stylesheet" href="http://localhost:8080/graduation/teacher/css/app.css">
</head>

<body style="margin-left: 10px; overflow: hidden;">

	<div id="ref_page" class="am-g">

		<div class="tpl-content-page-title" style="margin-bottom: 10px;">成绩评定</div>
		
		<ol class="am-breadcrumb">
				<li><a href="http://localhost:8080/graduation/teacher/tstudentlist2.html" class="am-icon-users">学生列表</a></li>
				<li class="am-active">成绩评价表</li>
		</ol>
		
		<div class="am-panel am-panel-default">
			  <div class="am-panel-bd">
			  	<div class="am-scrollable-horizontal">
				   <table class="am-table am-table-bordered am-table-radius am-table-centered">
				     <thead>
						<tr>
							<th colspan="5">毕业设计（论文）完成情况评价表(指导教师用，满分30分)</th>
						</tr>
					</thead>
					<tbody>
				     <tr id="tr1">
				     	<td>学生学号</td>
				     	<td></td>
				     	<td>学生姓名</td>
				     	<td></td>
				     </tr>
				     <tr id="tr2">
				     	<td>专业</td>
				     	<td></td>
				     	<td>班级</td>
				     	<td></td>
				     </tr>
				     <tr id="tr3">
				     	<td>设计题目</td>
				     	<td colspan="3"></td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>1．文献检索、阅读及综述能力分 （3分）</strong></p>
						     	<label class="am-radio am-secondary">
								  <input class="radio1" type="radio" name="radio1" value="3" data-am-ucheck>
								  	<p class="am-text-left">A  文献查阅、翻译、阅读、综述能力强 <span class="am-fr">（3分）</span></p>
								</label>
								<label class="am-radio am-secondary">
								  <input class="radio1" type="radio" name="radio1" value="1" data-am-ucheck>
								  	<p class="am-text-left">C  文献查阅、翻译、阅读、综述能力一般<span class="am-fr">（1分）</span></p>
								</label>
								<label class="am-radio am-secondary">
								  <input class="radio1" type="radio" name="radio1" value="2" data-am-ucheck>
								  	<p class="am-text-left">介于A、C之间的为B（2分）</p>
								</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>2．实验（设计）方案、研究方案及软硬件方案设计能力分 （5分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio2" type="radio" name="radio2" value="5" data-am-ucheck>
							  	<p class="am-text-left">A  在指导教师的指导下，方案具有独到见解<span class="am-fr">（5分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio2" type="radio" name="radio2" value="3" data-am-ucheck>
							  	<p class="am-text-left">C  只有在指导教师的多次指导下，才能确定方案 <span class="am-fr">（3分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio2" type="radio" name="radio2" value="4" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（4分）</p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio2" type="radio" name="radio2" value="2" data-am-ucheck>
							  	<p class="am-text-left">低于C的为D（2分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>3．基本理论运用及自学能力分 （5分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio3" type="radio" name="radio3" value="5" data-am-ucheck>
							  	<p class="am-text-left">A  基本概念清晰、基本理论扎实，并能在设计中很好运用，自学能力强<span class="am-fr">（5分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio3" type="radio" name="radio3" value="3" data-am-ucheck>
							  	<p class="am-text-left">C  基本概念、基本理论掌握程度一般，基本理论运用及自学能力一般  <span class="am-fr">（3分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio3" type="radio" name="radio3" value="4" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（4分）</p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio3" type="radio" name="radio3" value="2" data-am-ucheck>
							  	<p class="am-text-left">低于C的为D（2分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>4．分析问题、解决问题及计算机运用能力分 （5分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio4" type="radio" name="radio4" value="5" data-am-ucheck>
							  	<p class="am-text-left">A  能正确地分析毕业设计实施过程中遇到的各种问题，并提出解决问题的有效措施，同时具有很强的计算机运用技能<span class="am-fr">（5分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio4" type="radio" name="radio4" value="3" data-am-ucheck>
							  	<p class="am-text-left">C  能对设计过程中遇到的问题作初步分析，解决措施得当，计算机运用技能一般<span class="am-fr">（3分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio4" type="radio" name="radio4" value="4" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（4分）</p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio4" type="radio" name="radio4" value="2" data-am-ucheck>
							  	<p class="am-text-left">低于C的为D（2分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>5．动手能力分，包括程序调试、绘图、计算、实验、制作、数据处理等能力  （5分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio5" type="radio" name="radio5" value="5" data-am-ucheck>
							  	<p class="am-text-left">A  程序调试、原始实验记录或工作记录详细准确，系统测试准确，能正确分析与取舍所掌握的数据，能正确分析数据形成的各种原因，正确选择设计方法、计算结果正确<span class="am-fr">（5分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio5" type="radio" name="radio5" value="3" data-am-ucheck>
							  	<p class="am-text-left">C  程序调试、数据处理、理论计算能力一般<span class="am-fr">（3分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio5" type="radio" name="radio5" value="4" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（4分）</p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio5" type="radio" name="radio5" value="2" data-am-ucheck>
							  	<p class="am-text-left">低于C的为D（2分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>6．科学素养、学习态度、纪律表现分  （4分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio6" type="radio" name="radio6" value="4" data-am-ucheck>
							  	<p class="am-text-left">A  工作严谨、认真、诚实，学习努力、勤奋，严格遵守相关规章制度<span class="am-fr">（4分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio6" type="radio" name="radio6" value="2" data-am-ucheck>
							  	<p class="am-text-left">C  工作及学习态度表现一般，基本能遵守相关规章制度<span class="am-fr">（2分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio6" type="radio" name="radio6" value="3" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（3分）</p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio6" type="radio" name="radio6" value="1" data-am-ucheck>
							  	<p class="am-text-left">低于C的为D（1分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td colspan="4">
					     	<p class="am-text-left"><strong>7．工作量及毕业设计（论文）进度分  （3分）</strong></p>
					     	<label class="am-radio am-secondary">
							  <input class="radio7" type="radio" name="radio7" value="3" data-am-ucheck>
							  	<p class="am-text-left">A  工作量饱满，能按规定很好地完成进度<span class="am-fr">（3分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio7" type="radio" name="radio7" value="2" data-am-ucheck>
							  	<p class="am-text-left">C工作量一般，勉强完成进度<span class="am-fr">（2分）</span></p>
							</label>
							<label class="am-radio am-secondary">
							  <input class="radio7" type="radio" name="radio7" value="1" data-am-ucheck>
							  	<p class="am-text-left">介于A、C之间的为B（1分）</p>
							</label>
				     	</td>
				     </tr>
				     <tr>
				     	<td class="am-text-left"><strong>毕业设计完成情况总成绩：</strong></td>
				     	<td colspan="4"><span id="score">请完成选择</span></td>
				     </tr>
				     <tr>
				     	<td colspan="5"><textarea placeholder="指导教师评语" id="teacherEvaluate"
												style="width: 100%; height: 260px;"></textarea></td>
				     </tr>
				     </tbody>
				  </table>
				  <button id="pinjia_btn" type="button" class="am-btn am-btn-primary am-radius am-fr"
								data-am-loading="{spinner: 'circle-o-notch', loadingText: '提交中...', resetText: '提交完成'}">
								提交</button>
				</div>
			  </div>
		</div>

	</div>

	<script src="http://localhost:8080/graduation/js/jquery.min.js"></script>
	<script src="http://localhost:8080/graduation/amazeui/js/amazeui.min.js"></script>
	<script src="http://localhost:8080/graduation/teacher/js/app.js"></script>
	<script type="text/javascript">
		$(function() {
			
			var studentId=getQueryString("studentId");
			
			 $.ajax({
				   url: "/graduation/studentController/getStuAndProject",
				   type: 'get',
				   dataType:'json',
				   async:false,
				   data:{
					   studentId:studentId
				   },
				   success: function(data){
					  if(!isNull(data.studentScore)){
						  //是否更新
						  $('#pinjia_btn').text('更新(上次评分为: '+data.studentScore+')');
						  $('#teacherEvaluate').text(data.teacherEvaluate);
					  }
					  $('#tr1').find('td').eq(1).text(data.user.userAccount);
					  $('#tr1').find('td').eq(3).text(data.user.userName);
					  $('#tr2').find('td').eq(1).text(data.classInfo.subject.subjectName);
					  $('#tr2').find('td').eq(3).text(data.classInfo.className);
					  $('#tr3').find('td').eq(1).text(data.project.projectName);
				   }
				 });
			
			var array=[0,0,0,0,0,0,0];
			$('.radio1').click(function() {
				var radio1=$('.radio1:checked').val();
				array[0]=radio1;
				sumScore(array);
			});
			$('.radio2').click(function() {
				var radio2=$('.radio2:checked').val();
				array[1]=radio2;
				sumScore(array);
			});
			$('.radio3').click(function() {
				var radio3=$('.radio3:checked').val();
				array[2]=radio3;
				sumScore(array);
			});
			$('.radio4').click(function() {
				var radio4=$('.radio4:checked').val();
				array[3]=radio4;
				sumScore(array);
			});
			$('.radio5').click(function() {
				var radio5=$('.radio5:checked').val();
				array[4]=radio5;
				sumScore(array);
			});
			$('.radio6').click(function() {
				var radio6=$('.radio6:checked').val();
				array[5]=radio6;
				sumScore(array);
			});
			$('.radio7').click(function() {
				var radio7=$('.radio7:checked').val();
				array[6]=radio7;
				sumScore(array);
			});
			
			function sumScore(array){
				var sum=0;
				for(var i=0;i<array.length;i++){
					sum+=Number(array[i]);
				}
				$('#score').text(sum);
			}
			
			//点击提交评价按钮
			$.get('/graduation/lunwenController/getLunwenBySid',{
				studentId:studentId
			},function(data){
				if(data.lunwenStatus!=null&&data.lunwenStatus==1){
					$('#pinjia_btn').removeClass('am-disabled').text('提交');
					$('#pinjia_btn').click(function () {
						  var $btn = $(this);
						  var score=$('#score').text();
						  if(isNull(score)){
							  return;
						  }
						  $.post('/graduation/studentController/updateScore',{
								'_method':'put',
								studentScore:score,
								teacherEvaluate:$('#teacherEvaluate').val(),
								studentId:studentId
							},function(data){
								if(data){
									  $btn.button('loading');
									    setTimeout(function(){
									    	disableBtn('pinjia_btn','提交完成');
									  }, 3000);
								}
							}); 
						    
						});
				}else{
					$('#pinjia_btn').addClass('am-disabled').text('请先审核论文');
				}
			});
			
			
		});
	</script>
</body>

</html>